/*
 * @Author: your name
 * @Date: 2021-11-13 08:02:53
 * @LastEditTime: 2021-11-15 18:37:11
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \li-yuwei\admin\src\api\article\index.js
 */
import request from "../../utils/request";
//获取文章数据列表
function getPage(data) {
    return request({
        url: "/api/page",
        method: "post",
        data: data,
    });
}
//更改页面状态
function changePageState(data) {
    return request({
        url: "/api/page",
        method: "put",
        data: data,
    });
}
//删除(单个)
function delPage(data) {
    return request({
        url: "/api/page",
        method: "delete",
        data: data,
    });
}
//新增页面
function addPage(data) {
    return request({
        url: "/api/add/page",
        method: "post",
        data: data,
    });
}
//修改页面
function editPage(data) {
    return request({
        url: "/api/edit/page",
        method: "put",
        data: data,
    });
}
//详情
function getPageDetail(id) {
    return request({
        url: `/api/page/${id}`,
        method: "get",
    });
}
//批量删除
function batchDelPage(data) {
    return request({
        url: "/api/batchDelPage",
        method: "delete",
        data: data,
    });
}
//批量发布
function batchPubPage(data) {
    return request({
        url: "/api/batchPubPage",
        method: "put",
        data: data,
    });
}
//批量草稿
function batchDftPage(data) {
    return request({
        url: "/api/batchDftPage",
        method: "put",
        data: data,
    });
}

export default {
    getPage,
    delPage,
    addPage,
    editPage,
    getPageDetail,
    changePageState,
    batchDelPage,
    batchPubPage,
    batchDftPage,
};